/*
 * @Author: xiaosihan
 * @Date: 2025-11-01 10:00:00
 * @Last Modified by: xiaosihan
 * @Last Modified time: 2025-11-07 00:00:41
 */
import Api from './Api';
import { OllamaModel, SearchModel, ChatMessage } from '@/types/type';

// Ollama API
class OllamaTestApi extends Api {
    constructor() {
        super();
    }

    /**
     * 加载本地模型列表
     */
    load_local_models(data: any = {}) {
        return this._post("load_local_models", data);
    }

    /**
     * 搜索可用的 Ollama 模型
     */
    search_models(data: any) {
        return this._post("search_models", data);
    }

    /**
     * 安装 Ollama 模型
     */
    install_model(data: any) {
        return this._post("install_model", data);
    }

    /**
     * 向模型发送消息
     */
    send_chat_message(data: any) {
        return this._post("send_chat_message", data);
    }
}

const ollamaTestApi = new OllamaTestApi();
export default ollamaTestApi;